{extend name="index/iframe" /}

{block name="content"}
<div style="padding: 0 10px;">
    <ul style="overflow: hidden; padding-top:10px; padding-left:10px;">
        <li style="float: left; margin-right: 15px;">需回款总额：<b>{$Think.get.sdk_finish_price}</b></li>
        <li style="float: left; margin-right: 15px;">已回款总额：<b>{$Think.get.sdk_back_price}</b></li>
        <li style="float: left; margin-right: 15px;">已回款率：<b>{$Think.get.sdk_finish_rate}</b></li>
        <li style="float: left; margin-right: 15px;">未回款总额：<b>{$Think.get.sdk_no_price}</b></li>
    </ul>
    <table style="margin-top:0px;" id="tableBox" lay-filter="tableBox"></table>
</div>
{/block}

{block name="css"}{/block}

{block name="js"}
<script>
    layui.use(['form', 'table'], function(){
        var $ = layui.$
            ,table = layui.table
            ,load = layer.load();

        //表格初始化
        table.render({
            elem: '#tableBox'
            ,height: '600'
            ,url: '{:url("AuditCpMng/view")}'
            ,page: true
            ,where: {id: {$Think.get.id}}
            ,limit: 100
            ,limits: [100,200,400]
            ,loading: true
            ,id: 'tableId'
            ,done: function (res, curr, count) {
            layer.close(load);
        }
        ,cols: [[
            {field:'date', title: '对账日期', width: 200}
            ,{field:'game_id', title: '游戏名称', width: 150}
            ,{field:'channel_id', title: '渠道名称', width: 150}
            ,{field:'receipt_price', title: '需回款金额', width: 150}
            ,{field:'is_receipt', title: '是否回款', width: 150}
            ,{field:'receipt_rate', title: '回款率', width: 150}
        ]]
    });

    });
</script>
{/block}